Release 10.1A: OpenEdge Data Management:
DataServer for ODBC
Retrieving data-source results
Progress provides two techniques for accessing results returned from a data source by the stored procedure. You can:
The following 4GL procedure reads the database results from the stored procedure into the
proc–text–buffersupplied by Progress:
The Progress-defined buffer,
proc–text–buffer, has one character field namedproc–text. The buffer accepts the returned database results, converts them toCHARACTERdata type, and concatenates them into one string. The advantage of using theproc–text–bufferis that you do not have to worry about what kind of data the procedure returns. The buffer accepts any type of data, in any order. The disadvantage is that it is much more difficult to manipulate the data after you receive it. To act on anything butCHARACTERdata, you must extract the data from the buffer and convert it to its original data type before you can use it.Another benefit of the
proc–text–bufferis that it holds the results from all of the SQL statements included in a stored procedure. However, a buffer that you create can hold the results of only one SQL statement.This is the partial syntax for the
DEFINE BUFFERstatement that you use to create a buffer with the same characteristics of theproc–text–buffer:
For a complete description, see the
DEFINE BUFFERentry in the OpenEdge Development: Progress 4GL Reference .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |